-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Zendesk e2e enhancement #5
base: develop
Are you sure you want to change the base?
Conversation
|
||
@TS-ZD-RNTM-MACRO-02 @BQ_SINK @BQ_SINK_CLEANUP @FILE_PATH | ||
@TS-ZD-RNTM-MACRO-02 @BQ_SINK @BQ_SINK_CLEANUP @TEST_DATA @DELETE_TEST_DATA |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hook's value is @CREATE_GROUP I guess you have used a wrong one here.
@@ -17,7 +17,7 @@ | |||
@Regression | |||
Feature: Zendesk Source - Run time scenarios | |||
|
|||
@TS-ZD-RNTM-MACRO-01 @BQ_SINK @BQ_SINK_CLEANUP @FILE_PATH | |||
@TS-ZD-RNTM-MACRO-01 @BQ_SINK @BQ_SINK_CLEANUP @TEST_DATA @DELETE_TEST_DATA |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hook's value is @CREATE_GROUP, update the value here.
|
||
/** | ||
* Represents Test Setup and Clean up hooks. | ||
*/ | ||
public class TestSetupHooks { | ||
private static boolean firstFileSinkTestFlag = true; | ||
public static String testdata_Group = ""; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use camel case in the naming instead of underscore. (testdata_Group -> groupResponse)
|
||
/** | ||
* Represents Test Setup and Clean up hooks. | ||
*/ | ||
public class TestSetupHooks { | ||
private static boolean firstFileSinkTestFlag = true; | ||
public static String testdata_Group = ""; | ||
public static String cred = ""; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
change cred -> credentials
@After(order = 2, value = "@DELETE_GROUP") | ||
public void deleteGroup() { | ||
DataValidationHelper.deleteGroup(cred); | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fix the indentation
* Zendesk utility - enhancements. | ||
*/ | ||
public class DataValidationHelper { | ||
private static String baseURI = "https://cloudsufi.zendesk.com/api/v2"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can put this base URI in the plugin parameter properties file.
.header("authorization", cred) | ||
.delete(baseURI + "/groups/" + ZendeskPropertiesPageActions.uniqueId + ".json"); | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fix Indentation
BigInteger uniqueId = expectedOutputAsJson.get("id").getAsBigInteger(); | ||
JsonObject expectedOutputAsJson = gson.fromJson(TestSetupHooks.testdata_Group, JsonObject.class); | ||
JsonObject group = (JsonObject) expectedOutputAsJson.get("group"); | ||
System.out.println(group); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove System.out.println()
} | ||
} | ||
|
||
|
||
public static void verifyIfRecordCreatedInSinkForMultipleObjectsAreCorrect(String expectedOutputFile) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Revert all the spacing related changes in this method.
@@ -149,13 +143,17 @@ static boolean compareValueOfBothResponses(String zendeskResponse, String bigQue | |||
Map<String, Object> bigQueryResponseInMap = gson.fromJson(bigQueryResponse, type); | |||
MapDifference<String, Object> mapDifference = Maps.difference(zendeskResponseInmap, bigQueryResponseInMap); | |||
logger.info("Assertion :" + mapDifference); | |||
|
|||
return mapDifference.areEqual(); | |||
} | |||
|
|||
public static void getBigQueryTableData(String dataset, String table, BigInteger uniqueId) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have written the altered query here specifically for groups but this method getBigQueryTableData
is common and can be used to fetch data from any big query table, this will throw an error if the table consist data of another object. (For ex: Tags may not have field like updatedAt and createdAt).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The objects we are using : Groups and Organisations , both have the same fields.
@@ -41,7 +41,7 @@ | |||
public class ZendeskBatchSourceConfigTest { | |||
|
|||
private static final String MOCK_STAGE = "mockStage"; | |||
private static MockPipelineConfigurer pipelineConfigurer = null; | |||
private static MockPipelineConfigurer pipelineConfigure = null; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
revert this change, not related to Automation.
@@ -352,8 +352,8 @@ public void testConfigurePipelineWithInvalidBasicParam() { | |||
""); | |||
try { | |||
ZendeskBatchSource zendeskBatchSource = new ZendeskBatchSource(config); | |||
pipelineConfigurer = new MockPipelineConfigurer(null); | |||
zendeskBatchSource.configurePipeline(pipelineConfigurer); | |||
pipelineConfigure = new MockPipelineConfigurer(null); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Revert these changes.
@@ -414,8 +414,8 @@ public void testConfigurePipelineMultiSourceWithInvalidBasicParam() { | |||
""); | |||
try { | |||
ZendeskBatchMultiSource zendeskBatchMultiSource = new ZendeskBatchMultiSource(config); | |||
pipelineConfigurer = new MockPipelineConfigurer(null); | |||
zendeskBatchMultiSource.configurePipeline(pipelineConfigurer); | |||
pipelineConfigure = new MockPipelineConfigurer(null); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Revert these changes.
230dd4e
to
3833653
Compare
No description provided.